package com.test;

import java.util.ArrayList;
import java.util.List;

public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<String> list = new ArrayList<String>();
		list.add("11");
		list.add("22");
		list.add("33");
		list.add("44");
		System.out.println(list.size());
		System.out.println(list.get(4-1));
		
		new A().test();
	}
	
	public void test() {
		X x = new Y();
		System.out.println("11");
		x.xx();
		System.out.println(22);
	}

	
	public class X {
		public synchronized void xx() {
			try {
				wait(10 * 1000);
			} catch(Exception e) {
				e.printStackTrace();
			}
		}
	}
	
	
	public class Y extends X {
		
	}
}
